package pri.damai.xiaowu.goods.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import pri.damai.xiaowu.common.core.form.IdForm;
import pri.damai.xiaowu.common.core.vo.ResultVO;
import pri.damai.xiaowu.goods.common.command.SkuCreateCommand;
import pri.damai.xiaowu.goods.common.command.StockReduceCmd;
import pri.damai.xiaowu.goods.common.vo.GoodsInfoVO;

import java.util.List;

/**
 *
 * @Desc
 * @Author DaMai
 * @Date 2022/3/23 13:51
 * 但行好事，莫问前程。
 */
//@FeignClient(name = "goods")
public interface SkuService {

    @PostMapping("/createSku")
    ResultVO<Void> createSku(@RequestBody SkuCreateCommand skuCreateCommand);
    @PostMapping("/reduceSku")
    ResultVO<Void> reduceSku(@RequestBody StockReduceCmd stockReduceCmd);
    @PostMapping("/reduceSkus")
    ResultVO<Void> reduceSkus(@RequestBody List<StockReduceCmd> stockReduceCmd);

    @PostMapping("/getskuById")
    ResultVO<GoodsInfoVO> getSkuById(@RequestBody IdForm idForm);
}
